package org.achartengine.util;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * RectF的X数值，以及对应的item title数据封装的mXList
 * 
 * @author huangtg
 */
public class RecfXEntryList
{
	/**
	 * mList map<String, int[]> String is title of click item int[] is the RectF for the item's leftX,rightY
	 */
	private static List<Map<Float[], String>> mXList;
	
	private RecfXEntryList()
	{
		if (mXList == null)
		{
			mXList = new ArrayList<Map<Float[], String>>();
		}
	}
	
	/**
	 * get the mList: if mList is null, new mList;if mList is unull,will return the mList
	 * 
	 * @return mList
	 */
	public static List<Map<Float[], String>> getList()
	{
		new RecfXEntryList();
		return mXList;
	}
	
	/**
	 * reset mList to be null
	 */
	public static List<Map<Float[], String>> resetList()
	{
		if (mXList != null)
		{
			mXList.clear();
			mXList = null;
		}
		
		return mXList;
	}
	
}
